<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
    <script type="text/javascript" src="/lib/haha/core/start.js"></script>
    <!-- 系统公告列表 -->
    <link rel="stylesheet" href="/CSS/information_service.css">
    <link rel="stylesheet" href="/CSS/pageNation.css">
</head>

<body>
    <div id="header"></div>
    <div class="container">
        <!-- 搜索框 -->
        <div class="searchBox flex" id='search_content'>
            <!-- 搜索 -->
            <div class="searchPart flex" id='search'>
            </div>
        </div>
        <!-- 表格 -->
        <div class="tableBox" id="systemNoticeTable">
            <span id='sysMention'
                style="position: absolute;top:40px;left:45%;text-align: center;padding: 20px 0;">暂无数据</span>
            <div style="min-height: 450px;">
                <table cellspacing="0" cellpadding="0">
                    <thead>
                        <th width="112px">序号</th>
                        <th width="495px">标题</th>
                        <th width="332px">发布用户</th>
                        <th width="265px">发布时间</th>
                    </thead>
                    <tbody>
                        <script id='systemNoticeTableData' type="text/html">
                        {{if num}}
                        <tr>
                            <td  data-id='{{:#data["id"]}}'>{{:#data['num']}}</td>
                            <td  class="title" data-id='{{:#data["id"]}}'>{{:#data['title']}}</td>
                            <td  data-id='{{:#data["id"]}}'>{{:#data['senderName']}}</td>
                            <td  data-id='{{:#data["id"]}}'>{{:#data['sendTime']}}</td>
                        </tr>
                        {{else}}
                        <tr> <td></td> <td></td><td></td><td></td></tr>
                        {{/if}}
                    </script>
                    </tbody>
                </table>
            </div>
            <!-- 分页 -->
            <div class="pageNation">
                <div id="systemNoticePage"></div>
            </div>
        </div>

    </div>
    <!-- 脚部 -->
    <div id="footer"></div>
    <!-- 侧边固定按钮 -->
    <div id="sidebar"></div>
    <script type="text/javascript" src="/lib/layer-v3.1.1/layer/layer.js"></script>
    <script src="/lib/layui/layui.js"></script>
    <script type="text/javascript">
        shared.useLayout("showLine");
        core.useTemplateAuto('selectArr', config.selectSystemArr, {});
    </script>
    <script>
        function goMultiSearch() {
            var noticeData = {
                searchType: $("#searchselect").find("option:selected").val(),
                searchValue: $("#searchWord").val(),
                // 当前页
                page: 1,
                pageSize: 10,
                sortCode:''
            }
            pageData.tableData(config.querySystemNotice, noticeData, 'systemNoticeTableData', 'systemNoticePage', true, '#sysMention');
            if ($("#searchWord").val() && !base.patrn.test($("#searchWord").val())) {
                pageData.InsertLog('通知公告', '检索', $("#searchWord").val());
            }
        }
        $(function () {
            var noticeData = {
                searchType: $("#searchselect").find("option:selected").val(),
                searchValue: $("#searchWord").val(),
                // 当前页
                page: 1,
                // 每页显示条数
                pageSize: 10,
                sortCode:''
            }
            // 跳转详情
            core.toDetail('#systemNoticeTable', 'systemAnnouncementDetail.html');
            // 请求数据
            pageData.tableData(config.querySystemNotice, noticeData, 'systemNoticeTableData', 'systemNoticePage', true, '#sysMention');

        })
        //系统公告检索
        systemNoticeSearch();
        function systemNoticeSearch() {
            $("#systemNoticeSearchBtn").click(function () {

                // noticeData.searchType =  $("#sysNoticeSerachType").find("option:selected").val(),
                // noticeData.serarchValue = $("#sysNoticeSerachValue").val(),
                // noticeData.page = 1;

                var noticeData = {
                    searchType: $("#searchselect").find("option:selected").val(),
                    searchValue: $("#searchWord").val(),
                    // 当前页
                    page: 1,
                    pageSize: 10,
                    sortCode:''
                }
                pageData.tableData(config.querySystemNotice, noticeData, 'systemNoticeTableData', 'systemNoticePage', true, '#sysMention');
            })
        }

    </script>
</body>

</html>